package com.loong.user.model;

import com.loong.common.mybatis.entity.BaseEntity;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "user_device")
public class UserDevice extends BaseEntity {
    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Long userId;

    /**
     * 设备类型
     */
    @Column(name = "device_type")
    private Integer deviceType;

    /**
     * 设备号
     */
    @Column(name = "device_no")
    private String deviceNo;

    /**
     * 推送信息
     */
    @Column(name = "push_token")
    private String pushToken;

    /**
     * 最后登陆时间
     */
    @Column(name = "last_login_time")
    private Date lastLoginTime;

    /**
     * 注册时间[如果是用于注册的设备]
     */
    @Column(name = "register_time")
    private Date registerTime;

    /**
     * ip地址
     */
    @Column(name = "ip_address")
    private String ipAddress;

    /**
     * 设备信息[品牌,型号等]
     */
    @Column(name = "device_mode")
    private String deviceMode;

    /**
     * 是否在线
     */
    private Boolean online;
}